
import PySpice



def getvalue(var_name):
	vi_relative_path = '\\common\\commands\\GetSPICEVariable.vi'
	get_var_ref = PySpice.getvireference(vi_relative_path)
	parnames='Name','Value','found','error out'
	parvalues=var_name,0,0,0
	searchnames,searchvalues=get_var_ref.Call(parnames,parvalues)
	varvalue=searchvalues[1]
	return varvalue
	
var_name = "__spice__eval__out"
print "User var [{name}] = [{value}].".format(name=var_name, value = getvalue(var_name))
